package cn.whpu.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.sql.SQLOutput;

/**
 * @author Gim Gong
 * @date 2023/10/15
 */
@Slf4j
@Component
public class MyMqListener {

    @RabbitListener(queues = "hello.queue1")
    public void listenSimpleQueue(String msg) {
        System.out.println("消费者收到了消息队列hello.queue1的消息：【" + msg + "】");
    }

}
